package com.tubang.logistics.mapper;

import com.tubang.logistics.entity.LogisticsBill;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.tubang.logistics.vo.finance.*;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
 * <p>
 * 账单表 Mapper 接口
 * </p>
 *
 * @author youtanzhi
 * @since 2018-03-15
 */
public interface LogisticsBillMapper extends BaseMapper<LogisticsBill> {

	List<FinanceVO> listBill(@Param("startTime") Date startDate, @Param("endTime") Date endDate, @Param("userId") String userId, @Param("get") boolean get);

	FinanceSimpleVO countBill(@Param("startTime") Date startDate, @Param("endTime") Date endDate, @Param("userId") String userId, @Param("get") boolean get);

	List<FinanceTableVO> listBillTable(@Param("startTime") Date startDate, @Param("endTime") Date endDate, @Param("userId") String userId, @Param("get") boolean get, @Param("content") String content);

	FinanceSimpleVO getBillTotal(@Param("startTime") Date startDate, @Param("endTime") Date endDate, @Param("userId") String userId, @Param("get") boolean get, @Param("content") String content);

	List<BillListVO> listBillForCheck(@Param("startTime") Date startDate, @Param("endTime") Date endDate, @Param("userId") String userId, @Param("status") Integer financeStatus, @Param("content") String content);

	int updateBillById(@Param("record") BillUpdateVO billUpdateVO);

	List<LogisticsBill> listByIds(@Param("ids") List<String> ids);

	BillDetailVO getDetailById(String id);

	List<SettleDetailVO> listSettleDetailById(String id);

	int updateSettIdByIds(@Param("settId") String id, @Param("ids") List<String> ids);

	LogisticsBill selectByPrimaryKey(String id);
}